<?php
		session_start();  
		global $conn, $server, $dbuser, $dbpassword, $databasename;
			$conn;			
			$server="localhost";
			
			$dbuser="allahaba_rakesh";
			$dbpassword="rakesh123789";
			
		//	$dbuser="root";
			//$dbpassword="";
			
			$databasename="kinghost_king";
			
			
			$conn=mysql_connect($server,$dbuser,$dbpassword) or die(mysql_error());
			mysql_select_db($databasename,$conn) or die(mysql_error()); 
			
			error_reporting(E_ALL & !E_NOTICE);

		
		
		if(!session_is_registered('SITE_ID'))
		{
			session_register('SITE_ID');
				
		}
		
		if(!session_is_registered('USER_TYPE'))
		{
			session_register('USER_TYPE');				
			
		}		

//SERVER CODE		
	/*	$server="mysql7.casburn.net";
		$dbuser="Casburn_kingusr";
		$dbpassword="jatroyal";
		$databasename="Casburn_king";
		$conn=mysql_connect ("mysql7.casburn.net", "Casburn_kingusr", "jatroyal") or die ('I cannot connect to the database because: ' . mysql_error());
		mysql_select_db ("Casburn_king");  */		
		
		//GENERAL FUNCTIONS.
		
		function BeginTrans($act_conn)
		{
			mysql_query("BEGIN",$act_conn) or die(mysql_error());
		}
		
		function RollBackTrans($act_conn)
		{
			mysql_query("ROLLBACK",$act_conn) or die(mysql_error());
		}
		
		function CommitTrans($act_conn)
		{ 
			mysql_query("COMMIT",$act_conn) or die(mysql_error());
		}
		
		function CloseConnection($act_conn)
		{
			mysql_close($act_conn) or die(mysql_error());
		}
?>
